package com.smile.frame.config.log.systemlog;



import com.smile.frame.common.result.Result;

import java.util.Date;

/**
 * 系统日志 处理类工厂
 *
 * @author xunyong
 * @date 2021/7/22 15:12

 */
public class HandleLoggerFactory {


    public static AbstractHandlerLogger initLoggerHandler(String methName, Object response, SystemLog systemLog, Date startTime, Date endTime,
                                                          Object[] methParams, Exception exception) {

        if (response instanceof Result) {
            return new ControllerLogHandler(methName, response, systemLog, startTime, endTime, methParams, exception);
        } else {
            //service 层日志处理
            return new ServiceLogHandler(methName, response, systemLog, startTime, endTime, methParams, exception);
        }

    }

}
